<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //作用域链
    //执行上下文：执行JS代码环境
    let a = 10;   //全局变量
    function fn1(){
        let b = 'hello';
        function fn2(){
            let c = true;
            console.log(a);//10
            console.log(b);//hello
            console.log(c);//true
        }
        fn2();
    }
    fn1();
    console.log('c:'+c);
</script>
</html>